#创建空列表
L = []
L = list()
#创建非空列表
L = [1, 2, 3]
#
L= list(range(1,10,2))#(1,3,5...9) start end step
L = list (range(10))#0,1,2...9
L =list(range(2,10))#(2,3...9)
#"比较"运算
L1 = ["AB","CD"]
L2 = ["AC","BD"]
print(L1>L2)
print(L1<L2)
# L3 = [1,"two"]
# L4 = ["two",1]
# print(L3>L4)

#'''列表的切片，切片赋值'''
#切片返回的是列表
L = list(range(10))
print(L)
print(L[0:7])#start:end step为1，前包括，后不包括
print(L[0:7:2])
print(L[:-1])#表示最后一个元素的索引
